
url_pref="http://yann.lecun.com/exdb/mnist/"
mkdir -p data
files="
train-images-idx3-ubyte
train-labels-idx1-ubyte
t10k-images-idx3-ubyte
t10k-labels-idx1-ubyte"

set -e
cd data
for f in $files
do
	if [ ! -e $f ]; then
		echo "download: $f.gz"
		wget $url_pref$f.gz
		gunzip $url_pref$f.gz
	fi
done

